package com.cq.hd.member.service;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.*;
import com.cq.hd.member.api.vo.*;
import com.cq.hd.member.po.TbWithdrawalBillPo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 提现记录表 服务类
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
public interface TbWithdrawalBillService extends IService<TbWithdrawalBillPo> {

    Boolean apply(WithdrawalApplyDto withdrawalApplyDto);

    Boolean applyV2(WithdrawalApplyV2Dto withdrawalApplyV2Dto);

    Page<WithdrawalApplyPageVo> pageWithdrawalBill(WithdrawalApplyPageDto withdrawalApplyPageDto);

    Page<WithdrawalApplyPageVo> pageMerchantWithdrawalBill(WithdrawalApplyPageDto withdrawalApplyPageDto);

    Page<AdminWithdrawalApplyPageVo> pageAdminWithdrawalBill(AdminWithdrawalApplyPageDto adminWithdrawalApplyPageDto);

    Boolean audit(AdminWithdrawalApplyAuditDto adminWithdrawalApplyAuditDto);

    AdminWithdrawalAmtVo getWithdrawalAmt(AdminWithdrawalApplyPageDto adminWithdrawalApplyPageDto);

    Boolean consumerWithdrawalMsg(Long id);

    List<WithdrawalBillVo> listByDto(WithdrawalBillDto withdrawalBillDto);

    Boolean scanWithdrawalBill();

    SubsidyNoEnoughVo getSubsidyNoEnough(Long merchantId);

    /**
     * 商户已提现商户本金累计
     *
     * @param merchantId 商户id
     * @return 已提现金额
     */
    BigDecimal getMerchantAccWithdrawalAmt(Long merchantId);

    Boolean checkBillConfirm(Long checkBillId);

    // 结算池提现申请 - 打款 - 上传打款凭证
    Boolean uploadPaymentVoucher(AdminWithdrawalBillPaymentVoucherDto adminWithdrawalBillPaymentVoucherDto);

    WithdrawalCheckBillInitVo initCheck(Long withdrawalId);

    WithdrawalCheckBillInitVo checkInfo(Long checkBillId);

    Boolean saveCheckBill(WithdrawalCheckBillSaveDto checkBillSaveDto);

    TbWithdrawalBillPaymentVoucherVo getPaymentVoucher(Long withdrawalBillId);
}
